<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="Parichay.Domain"
                   namespace="Parichay.Domain">
    <!--
        NOTE: lazy="false" was added to fix a problem with NHibernate 1.2 Beta 2 where the property
              Id is expected to be virtual. This seems to be because by default 1.2 assumes all objects
              are proxy-ready.
    -->
    <class name="Application" table="aspnet_application" lazy="false">
        <!-- Primary key is auto-generated by the database's native method. -->
        <id name="Id">
            <generator class="native">
                <!-- Used for Oracle tests, does not affect MS SQL. -->
                <param name="sequence">Application_Id_SEQ</param>
            </generator>
        </id>
        <property name="Name" />
        <property name="LoweredName" />
        <property name="Description" />
    </class>

    <!--
        Queries used for support of base provider logic, which is assumes relationships are for a single
        web application. Therefore, all these queries expect an application identifier to be specified.
    -->
    <query name="Application.ByLoweredName">
        <![CDATA[
             from Application as app
            where app.LoweredName = ?
        ]]>
    </query>
</hibernate-mapping>